<!doctype html>
        <!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]-->
        <!--[if IE 7]>    <html class="lt-ie9 lt-ie8" lang="en-US"> <![endif]-->
        <!--[if IE 8]>    <html class="lt-ie9" lang="en-US"> <![endif]-->
        <!--[if gt IE 8]><!--> <html lang="en-US" xmlns:th="http://www.thymeleaf.org"> <!--<![endif]-->
        <head>
                <!-- META TAGS -->
                <meta charset="UTF-8" />
                <meta name="viewport" content="width=device-width, initial-scale=1.0">

                <title>学习生活交流论坛</title>

                <link rel="shortcut icon" href="../static/asserts/images/login_logo.png" />

                <!-- Style Sheet-->
                <link rel='stylesheet' id='bootstrap-css-css'  href='../static/asserts/css/bootstrap5152.css?ver=1.0' type='text/css' media='all' />
                <link rel='stylesheet' id='responsive-css-css'  href='../static/asserts/css/responsive5152.css?ver=1.0' type='text/css' media='all' />
                <link rel='stylesheet' id='pretty-photo-css-css'  href='../static/asserts/js/prettyphoto/prettyPhotoaeb9.css' type='text/css' media='all' />
                <link rel='stylesheet' id='main-css-css'  href='../static/asserts/css/main.css' type='text/css' media='all' />


                <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
                <!--[if lt IE 9]>
                <script src="../static/asserts/js/html5.js"></script></script>
                <![endif]-->

        </head>

        <body>
                <!-- Start of Header -->
                <div th:if="${not #strings.isEmpty(${category})}" th:replace="commons/bar::topbar(activeUri=${category})"></div>
                <!-- End of Header -->

                <!-- Start of Search Wrapper -->
                <div class="search-area-wrapper">
                        <div class="search-area container">
                                <h3 class="search-header">来 ! 发 现 !</h3>
                                <p class="search-tag-line">If you have any question you can ask below or enter what you are looking for!</p>
                                <form action="/search" id="search-form" class="search-form clearfix" method="get"  th:action="${category}==null?@{/search}:@{/search/}+${category}" autocomplete="off">
                                        <select name="way" class="search-class">
                                                <option  value="title" class="select-opt">帖子</option>
                                                <option  value="author" class="select-opt">作者</option>
<!--                                             <option  value="levelmore">等级大于</option>-->
<!--                                             <option  value="levelless">等级小于</option>-->
                                        </select>
                                        <input class="search-term required" type="text" id="s" name="searchname" placeholder="搜索帖子" title="搜索帖子" />
                                        <input class="search-btn" type="submit" value="搜索" />
                                        <div id="search-error-container"></div>
                                        <div style="color: white; font-size: 17px; text-align: center; margin-top: 40px; margin-bottom: 0px"><b th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></b></div>
                                </form>

                        </div>
                </div>
                <!-- End of Search Wrapper -->

                <!-- Start of Page Container -->
                <div class="page-container">
                        <div class="container">
                                <div class="row">

                                        <!-- start of page content -->
                                        <div class="span8 main-listing">


                                                <article class="format-standard type-post hentry clearfix" th:each="article:${articles}">

                                                        <header class="clearfix">

                                                                <h3 class="post-title">
                                                                        <a href="single.html" th:text="${article.title}==null?${article.id}:${article.title}" th:href="@{/showBlog/}+${article.id}"></a>
                                                                </h3>

                                                                <div class="post-meta clearfix">
                                                                        <span class="date"  th:text="${article.dateformat}==null?'暂无日期':${article.dateformat}"></span>
                                                                        <span  class="author"><a th:href="@{/otheruserspace/}+${article.author}" th:text="${article.author}" ></a></span>
                                                                        <span  class="category" th:text="${article.categoryName}" ></span>
                                                                        <span class="comments"><a href="#" th:text="${article.reply_cnt}+回复" th:href="@{/showBlog/}+${article.id}" th:if="${session.status}"></a></span>
                                                                        <span class="like-count" th:text="${article.likes}"></span>
                                                                        <span class="" th:text="等级要求+${article.level}"></span>
                                                                </div><!-- end of post meta -->
                                                                <p th:text="${article.summary}==null?'暂无简介':${article.summary}"></p>
                                                        </header>
                                                </article>

<!--                                                <div id="pagination">-->
<!--                                                        <a href="#" class="btn active">1</a>-->
<!--                                                        <a href="#" class="btn">2</a>-->
<!--                                                        <a href="#" class="btn">3</a>-->
<!--                                                        <a href="#" class="btn">Next »</a>-->
<!--                                                        <a href="#" class="btn">Last »</a>-->
<!--                                                </div>-->

                                        </div>
                                        <!-- end of page content -->


                                        <!-- start of sidebar -->
                                        <aside class="span4 page-sidebar">

                                                <section class="widget">
                                                        <div class="support-widget">
                                                                <a th:href="${session.loginuser}==null? @{/register}:@{/mk}"
                                                                   th:if="${session.status}">发布帖子</a>
                                                        </div>
                                                </section>


                                                <section class="widget">
                                                        <h3 class="title">最热帖子</h3>
                                                        <ul class="articles">
                                                                <li class="article-entry standard" th:each="course:${sidebar}">
                                                                        <h4><a href="single.html" th:text="${course.title}==null?${course.id}:${course.title}" th:href="@{/showBlog/}+${course.id}"></a></h4>
                                                                        <span class="" th:text="${course.dateformat}==null?'暂无日期':${course.dateformat}"></span>
                                                                        <span class=""><a th:href="@{/otheruserspace/}+${course.author}" th:text="${course.author}" ></a></span>
                                                                        <span class=""><a th:text="${course.categoryName}"></a></span>
                                                                        <span class="" th:text="等级要求+${course.level}"></span>
                                                                        <span class="like-count" th:text="${course.likes}" ></span>
                                                                </li>
                                                        </ul>
                                                </section>

                                        </aside>
                                        <!-- end of sidebar -->
                                </div>
                        </div>
                </div>
                <!-- End of Page Container -->


                <a href="#top" id="scroll-top"></a>
                <script>
                        function submit(){
                                var str = document.getElementById("username").innerHTML;
                                setInfo(str);
                        }
                        //储存数据  
                        function setInfo(name) {
                                sessionStorage.setItem("username", name);
                        }
                </script>
                <!-- script -->
                <script type='text/javascript' src='../static/asserts/js/jquery-1.8.3.min.js'></script>
                <script type='text/javascript' src='../static/asserts/js/jquery.easing.1.34e44.js?ver=1.3'></script>
                <script type='text/javascript' src='../static/asserts/js/prettyphoto/jquery.prettyPhotoaeb9.js?ver=3.1.4'></script>
                <script type='text/javascript' src='../static/asserts/js/jquery.liveSearchd5f7.js?ver=2.0'></script>
				<script type='text/javascript' src='../static/asserts/js/jflickrfeed.js'></script>
                <script type='text/javascript' src='../static/asserts/js/jquery.formd471.js?ver=3.18'></script>
                <script type='text/javascript' src='../static/asserts/js/jquery.validate.minfc6b.js?ver=1.10.0'></script>
                <script type='text/javascript' src='../static/asserts/js/custom5152.js?ver=1.0'></script>
</body>
</html>
